package test.spider;

import java.util.ArrayList;
import java.util.List;

import billing.spider.annotation.NextAnno;
import billing.spider.annotation.SelectorAnno;
import billing.spider.annotation.SpiderAnno;
import billing.spider.annotation.SpiderAnno.M;
import billing.spider.bean.BaseSpider;

@SpiderAnno(value = "http://10.10.150.64:88/spider/page2.html", selector = "div.case", next = {
			@NextAnno("a.next")
		}, description = "pageinfo", reqType = M.POST)
public class DemoSpider extends BaseSpider {
	private static final long serialVersionUID = 7716512507859913798L;

	@SelectorAnno("span.name")
	public String name;

	@SelectorAnno("span.sex")
	public String sex;

	@SelectorAnno("span.age")
	public String age;
	
	@SelectorAnno(value = "span.dtl" ,type=String.class)
	public List<String> dtl = new ArrayList<String>();
	
	@SelectorAnno(value = "a.dtl" ,type=DtlSpider.class , attr="href")
	public List<DtlSpider> dtlSpider = new ArrayList<DtlSpider>();

	@Override
	public String toString() {
		return "DemoSpider [name=" + name + ", sex=" + sex + ", age=" + age + ", dtl=" + dtl
				+ ", dtlSpider=" + dtlSpider + "]";
	}
}
